package com.xms.sdk.service;

import com.xms.core.data.Entity;
import com.xms.core.exception.XmsException;
import com.xms.sdk.core.query.QueryExpression;

import java.sql.SQLException;
import java.util.List;

/**
 * <p>
 * IDataUpdater
 * </p>
 *
 * @author migo
 * @since 2021/9/6
 */
public interface IDataUpdater {
    boolean update(Entity entity, boolean ignorePermissions) throws Exception;

    boolean update(Entity entity, QueryExpression query, boolean ignorePermissions) throws XmsException, SQLException;

    boolean update(List<Entity> entities, boolean ignorePermissions) throws XmsException, SQLException;

    boolean update(Entity entity) throws Exception;

    boolean update(Entity entity, QueryExpression query) throws XmsException, SQLException;

    boolean update(List<Entity> entities) throws XmsException, SQLException;
}
